﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using Newtonsoft.Json.Linq;
using System.Data;
using TaoSH.Data;

namespace TaoSH.AppCode
{
    public class BLLHelp
    {
        /// <summary>
        /// 绑定类
        /// </summary>
        public class BindData
        {
            /// <summary>
            /// 绑定商品类别
            /// </summary>
            /// <param name="ddl"></param>
            public void BindSPLB(DropDownList ddl, string strTopID)
            {

                ddl.DataSource = new PT_Pro_CategoryB().GetEntities(d => d.TopID.ToString() == strTopID).OrderBy(d => d.Sort);
                ddl.DataTextField = "MenuTxt";
                ddl.DataValueField = "ID";
                ddl.DataBind();
            }

            public void BindSPBQ(DropDownList ddl)
            {

                ddl.DataSource = new PT_Index_TypeB().GetEntities(d => d.ID != 0);
                ddl.DataTextField = "TypeName";
                ddl.DataValueField = "TypeName";
                ddl.DataBind();
            }
        }


    }
}